﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="XbdSoft.ActiveX.WebSite.Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h1>Test Active X</h1>
        <OBJECT id="OurActiveX" name="OurActiveX" classid="clsid:ECE236A9-AF9C-45DA-8D58-081907287FFE" 
	            VIEWASTEXT codebase="XbdSoft.ActiveXCAB.CAB">
                </OBJECT>

                <input type="button" value="Download" onclick="return OpenActiveX();"/>
    </div>
    <script type="text/javascript">
        var index = 47;
        function OpenActiveX() {
            try {
                document.OurActiveX.Download(index);
                index = index + 1;
            }
            catch (Err) {
                alert(Err.description);
            }

        } 
    </script>
    </form>
</body>
</html>
